<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport"
        content="width=device-width, initial-scale=1.0">
<meta name="HandheldFriendly" content="true">
<title>Sample</title>
</head>
<body style="margin:0; padding:0;">
<div style="text-align:center;">
  <video width="240" height="176">
    <source src="video/movie.ogg" type="video/ogg" />
    <source src="video/movie.mp4" type="video/mp4" />
    <source src="video/movie.webm" type="video/webm" />
  </video>
  <p>
    <a href="JavaScript:video.play();">播放</a> |
    <a href="JavaScript:video.pause();">暂停</a> |
    <a href="JavaScript:toggleMute();">声音关闭/声音打开</a>
  </p>
</div>
<script>
// 获得对video元素的引用
var video = document.getElementsByTagName('video')[0];
function toggleMute() {
  video.muted = !video.muted; // 切换声音的关闭与打开
}
</script>
</body>
</html>
